<?php

namespace Application;

use Zend_Config;
use Zend_Db;

class Db
{
    protected static $instance;

    public static function getInstance()
    {
        if (null === self::$instance) {
            self::$instance = Zend_Db::factory(new Zend_Config(Config::getInstance()['database']));
            self::$instance->getProfiler()->setEnabled(true);
        }
        return self::$instance;
    }
}
